<template>
<div class="public-common">
    <!--业务办理 && 企业车载终端设备不上线报备申请-->
    <div class="public-title">企业车载终端设备不上线报备申请</div>
    <div class="public-searchbox">
        <el-row>
            <el-col :span="6">
                <el-input placeholder="请输入内容" v-model="form.test" class="input-with-select"  size="mini" />
            </el-col>
            <el-col :span="18">
                <el-button type="primary" icon="el-icon-search" size="mini"  style="margin-left:10px;">搜索</el-button>
                <el-button type="success" size="mini"  icon="el-icon-edit-outline">新建</el-button>
                <el-button type="danger" size="mini"  icon="el-icon-delete">删除</el-button>
                <el-button type="warning" size="mini"  icon="el-icon-printer">打印</el-button>
            </el-col>
        </el-row>
    </div>
    <el-scrollbar class="public-scroll">
        <el-table :data="tabledata" size="mini" border stripe header-row-class-name="textcenter">
            <el-table-column
            type="selection"
            width="55" fixed="left">
            </el-table-column>
            <el-table-column
                label="申请编号">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column> 
            <el-table-column
                label="车牌号">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column> 
            <el-table-column
                label="车型">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="GPS编号">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="GPS提供商">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="申请设备">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="申请原因">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="驳回原因">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="申请时间">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="审核时间">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>
            <el-table-column
                label="审核状态">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>            
            <el-table-column
                label="操作" fixed="right">
                <template slot-scope="scope">
                    <el-button type="primary" size="mini">编辑</el-button>
                </template>
            </el-table-column>             
        </el-table>
    </el-scrollbar>
    <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page.now"
        :page-sizes="page.sizes"
        :page-size="page.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total" style="margin-top:10px;">
    </el-pagination>

    <!--dialog-->
    <el-dialog title="机打票仓库管理" :visible.sync="dialog.isVisible" width="600px" top="20vh">
        <el-scrollbar style="height:350px;">
        <el-form size="mini" label-width="120px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="上报车辆类型">
                        <el-select v-model="dialog.carid" placeholder="请选择" style="width:100%;">
                            <el-option
                            v-for="item in select.cartype"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="公司名称">
                        <el-input v-model="dialog.test"></el-input>
                    </el-form-item>
                    <el-form-item label="GPS提供商">
                        <el-select v-model="dialog.carid" placeholder="请选择" style="width:100%;">
                            <el-option
                            v-for="item in select.gps"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="申请时间">
                        <el-date-picker
                        v-model="dialog.test"
                        type="datetime"
                        format="yyyy-MM-dd HH:mm"
                        value-format="yyyy-MM-dd HH:mm"
                        placeholder="选择日期时间" style="width:100%;" disabled>
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="GPS不上线日期">
                        <el-date-picker
                        v-model="dialog.test"
                        type="datetime"
                        format="yyyy-MM-dd HH:mm"
                        value-format="yyyy-MM-dd HH:mm"
                        placeholder="选择日期时间" style="width:100%;" disabled>
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="申请原因">
                        <el-radio v-model="dialog.sqreason" label="1">事故</el-radio>
                        <el-radio v-model="dialog.sqreason" label="2">GPS故障维修</el-radio>
                        <el-radio v-model="dialog.sqreason" label="3" disabled>下户</el-radio>
                        <el-radio v-model="dialog.sqreason" label="4">车辆维修</el-radio>
                        <el-radio v-model="dialog.sqreason" label="5">GPS主机丢失</el-radio>
                        <el-radio v-model="dialog.sqreason" label="6">其他</el-radio>
                    </el-form-item>
                    <el-form-item label="事由">
                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" v-model="dialog.test"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="营运档车牌号">
                        <el-select v-model="dialog.carid" placeholder="请选择" style="width:100%;">
                            <el-option
                            v-for="item in select.cartype"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="车类型">
                        <el-input v-model="dialog.test"></el-input>
                    </el-form-item>
                
                    <el-form-item label="GPS编号">
                        <el-input v-model="dialog.test"></el-input>
                    </el-form-item>
                    <el-form-item label="申请人">
                        <el-input v-model="dialog.test" disabled></el-input>
                    </el-form-item>
                    <el-form-item label="至">
                        <el-date-picker
                        v-model="dialog.test"
                        type="datetime"
                        format="yyyy-MM-dd HH:mm"
                        value-format="yyyy-MM-dd HH:mm"
                        placeholder="选择日期时间" style="width:100%;" disabled>
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item label="申请设备">
                        <el-radio v-model="dialog.sqsb" label="1">车载GPS终端</el-radio>
                    </el-form-item>
                    <el-form-item label="企业意见">
                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" v-model="dialog.test"></el-input>
                    </el-form-item>
                    <el-form-item label="备注">
                        <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" v-model="dialog.test"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>

        </el-form>
        </el-scrollbar>
        <div class="textcenter" style="padding-top:10px;">
            <el-button type="primary" size="mini">确定</el-button>  
            <el-button type="info" @click="dialog.isVisible = false" size="mini">返回</el-button>
        </div>
    </el-dialog>
</div>
</template>
<script>
export default {
    data(){
        return {
            form:{
                test:''
            },
            tabledata:[],
            page:{
              now:1,
              pagesize:10,
              sizes:[2,10, 20, 50, 100],
              total:0,
              key:''
            },
            select:{
                carids:[],
                types:[]
            },
            dialog:{
                isVisible:false,
                test:'',
                sqsb:'1'
            }
        }
    },
    components:{
    },
    mounted(){
        
    },
    methods:{
        getValue(html){

        },
        handleChange(file, fileList){
            console.log("file",file)
        },
        search(){
            alert("search")
        },
        //分页
        handleSizeChange(pagesize){
            this.page.pagesize = pagesize;
            this.search(true,true);
        },
        handleCurrentChange(pageno){
            this.page.now = pageno;
            this.search(true,true);
        }

    }
}
</script>